3.4.43 \(\int x^m (a+b x^2) \, dx\) [343]

Optimal. Leaf size=25 \[ \frac {a x^{1+m}}{1+m}+\frac {b x^{3+m}}{3+m} \]

[Out]

a*x^(1+m)/(1+m)+b*x^(3+m)/(3+m)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \begin {gather*} \frac {a x^{m+1}}{m+1}+\frac {b x^{m+3}}{m+3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^m*(a + b*x^2),x]

[Out]

(a*x^(1 + m))/(1 + m) + (b*x^(3 + m))/(3 + m)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin {align*} \int x^m \left (a+b x^2\right ) \, dx &=\int \left (a x^m+b x^{2+m}\right ) \, dx\\ &=\frac {a x^{1+m}}{1+m}+\frac {b x^{3+m}}{3+m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 25, normalized size = 1.00 \begin {gather*} \frac {a x^{1+m}}{1+m}+\frac {b x^{3+m}}{3+m} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^m*(a + b*x^2),x]

[Out]

(a*x^(1 + m))/(1 + m) + (b*x^(3 + m))/(3 + m)

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 30, normalized size = 1.20

method result size
norman \(\frac {a x \,{\mathrm e}^{m \ln \left (x \right )}}{1+m}+\frac {b \,x^{3} {\mathrm e}^{m \ln \left (x \right )}}{3+m}\) \(30\)
risch \(\frac {x \left (b m \,x^{2}+b \,x^{2}+a m +3 a \right ) x^{m}}{\left (3+m \right ) \left (1+m \right )}\) \(34\)
gosper \(\frac {x^{1+m} \left (b m \,x^{2}+b \,x^{2}+a m +3 a \right )}{\left (3+m \right ) \left (1+m \right )}\) \(35\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(b*x^2+a),x,method=_RETURNVERBOSE)

[Out]

a/(1+m)*x*exp(m*ln(x))+b/(3+m)*x^3*exp(m*ln(x))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 25, normalized size = 1.00 \begin {gather*} \frac {b x^{m + 3}}{m + 3} + \frac {a x^{m + 1}}{m + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(b*x^2+a),x, algorithm="maxima")

[Out]

b*x^(m + 3)/(m + 3) + a*x^(m + 1)/(m + 1)

________________________________________________________________________________________

Fricas [A]
time = 1.78, size = 33, normalized size = 1.32 \begin {gather*} \frac {{\left ({\left (b m + b\right )} x^{3} + {\left (a m + 3 \, a\right )} x\right )} x^{m}}{m^{2} + 4 \, m + 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(b*x^2+a),x, algorithm="fricas")

[Out]

((b*m + b)*x^3 + (a*m + 3*a)*x)*x^m/(m^2 + 4*m + 3)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 94 vs. \(2 (19) = 38\).
time = 0.13, size = 94, normalized size = 3.76 \begin {gather*} \begin {cases} - \frac {a}{2 x^{2}} + b \log {\left (x \right )} & \text {for}\: m = -3 \\a \log {\left (x \right )} + \frac {b x^{2}}{2} & \text {for}\: m = -1 \\\frac {a m x x^{m}}{m^{2} + 4 m + 3} + \frac {3 a x x^{m}}{m^{2} + 4 m + 3} + \frac {b m x^{3} x^{m}}{m^{2} + 4 m + 3} + \frac {b x^{3} x^{m}}{m^{2} + 4 m + 3} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*(b*x**2+a),x)

[Out]

Piecewise((-a/(2*x**2) + b*log(x), Eq(m, -3)), (a*log(x) + b*x**2/2, Eq(m, -1)), (a*m*x*x**m/(m**2 + 4*m + 3)
+ 3*a*x*x**m/(m**2 + 4*m + 3) + b*m*x**3*x**m/(m**2 + 4*m + 3) + b*x**3*x**m/(m**2 + 4*m + 3), True))

________________________________________________________________________________________

Giac [A]
time = 0.90, size = 43, normalized size = 1.72 \begin {gather*} \frac {b m x^{3} x^{m} + b x^{3} x^{m} + a m x x^{m} + 3 \, a x x^{m}}{m^{2} + 4 \, m + 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(b*x^2+a),x, algorithm="giac")

[Out]

(b*m*x^3*x^m + b*x^3*x^m + a*m*x*x^m + 3*a*x*x^m)/(m^2 + 4*m + 3)

________________________________________________________________________________________

Mupad [B]
time = 4.80, size = 34, normalized size = 1.36 \begin {gather*} \frac {x^{m+1}\,\left (3\,a+a\,m+b\,x^2+b\,m\,x^2\right )}{m^2+4\,m+3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(a + b*x^2),x)

[Out]

(x^(m + 1)*(3*a + a*m + b*x^2 + b*m*x^2))/(4*m + m^2 + 3)

________________________________________________________________________________________